package com.ai.wxy.spring.user.domain;

import com.ai.spring.data.jpa.domain.JpaEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 用户表
 *
 * @author 石头
 * @Date 2019/10/25
 * @Version 1.0
 **/
@Entity
@Data
@Table(name = "user")
public class User extends JpaEntity {
    @Id
    private Long id;

    @Column(unique = true)
    private String username;

    private String email;
    private String phone;
    private String password;

    @Column(name = "create_time",insertable = false,updatable = false)
    private Date createTime;
    @Column(name = "update_time",updatable = false,insertable = false)
    private Date updateTime;

    /**数据有效性*/
    @Column(name = "status",insertable = false)
    private Integer status;
}
